package com.yonyou.pmclouds.safeinspection.entity;

import com.yonyou.pmclouds.basecom.entity.SuperVO;
import com.yonyou.pmclouds.copyperson.entity.CopyPersonVO;
import com.yonyou.pmclouds.inspectitem.entity.InspectItemVO;
import com.yonyou.pmclouds.picture.entity.PictureVO;
import com.yonyou.pmclouds.safetypatrol.entity.SafetypatrolDetailVO;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


@Data
@Table(name = "pm_safeinspection")
public class SafeInspectionVO extends SuperVO {

    public static String PK_PROJECT = "pk_project";

    public static String PK_SAFETYPATROL = "pk_safetypatrol";


    @Id
    private String pk_safeinspection;
    //项目名称
    private String pk_project;

    //检查标准(安全标准)
    private String pk_safetypatrol;
    //施工单位
    private String pk_constructionunit;
      //工程部位
     private String pkProjectpart;
     //巡查类型
    private byte standardType;
    //整改数量
    private int modifycount;

    /**
     * 前端展示字段 指所有前端要展示的字段
     */

    //主表安全标准名称
    @Transient
    private String safetypatrolName;
    //子表检查项 检查项描述 直接以实体类给到前端
    @Transient
    private SafetypatrolDetailVO[] safetypatrolDetailVOs;

    //项目名字
    @Transient
    private String projectName;
    //项目代码
    @Transient
    private String projectCode;
    //施工单位名字
    @Transient
    private String constructionunitName;
    //工序名称
    @Transient
    private String processName;

    //检查记录实体类
    @Transient
    private InspectItemVO[] inspectItemVOS;
    //合格率
    private BigDecimal passRate;





    //检查记录里面的
    @Transient
    private PictureVO[] pictures;

    //项目里面查看结果的 制单人
    @Transient
    private String creatorName;






    /**
     * 通用字段
     **/
    @Column(name = "pk_tenant", updatable = false)
    private String pk_tenant;
    @Column(name = "creator", updatable = false)
    private String creator;
    @Column(name = "creationtime", updatable = false)
    private Date creationtime;
    private String modifier;
    private Date modifytime;
    // 经度
    private BigDecimal longitude;
    // 纬度
    private BigDecimal latitude;
    // 位置信息
    private String position;
    //单据类型
    private String bill_type;

    private byte billstatus;




    // 打印预览需要的字段
    @Transient
    private String strCreationtime;
    @Transient
    private String pk_process_inspect;
    // 合格率(打印预览的)
    @Transient
    private String qualification_rate;
    @Transient
    private int totItemNum;
    @Transient
    private int passNum;
    @Transient
    private int unPassNum;

    @Transient
    private String orgName;
    @Transient
    private String strBillstatus;
    @Transient
    private String manager;
    @Transient
    private String managerName;

    //抄送人
    @Transient
    private List<CopyPersonVO> copyPersonVOS;



//    去掉的字段
    /**
     * 工序名称
     *  private String pk_process;
     *  安全标准
     *   @Transient
     *   private SafetypatrolVO safetypatrolVO;
     **/

}
